package cn.smilefox.service.impl;

import cn.smilefox.dao.UseDao;
import cn.smilefox.domain.*;
import cn.smilefox.dao.CourseDao;
import cn.smilefox.dao.RoleDao;
import cn.smilefox.dao.TeacherDao;
import cn.smilefox.service.CourseService;
import cn.smilefox.service.UseService;

import java.util.List;

public class UseServiceImpl implements UseService{

    private UseDao useDao;

    public void setUseDao(UseDao useDao) {
        this.useDao = useDao;
    }

    //登录功能
    @Override
    public Use login(Use use) {
        Use use1 = useDao.login(use);

        return use1;
    }

    @Override
    public void register(Use use) {
        useDao.register(use);
    }

    @Override
    public boolean namecheck(String use_name) {
        List<Use> useList = useDao.namecheck(use_name);
        if (useList.isEmpty()){
            return true;
        }else
        {return false;}
    }


}
